package com.turtle3d.user.grammars;

import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.formallanguage.parser.SimpleParser;
import com.turtle3d.formallanguage.symbol.Symbol;
import com.turtle3d.formallanguage.symbol.SymbolFactory;

public class ArrowHead extends Grammar {

	@Override
	public void define() {
		
//		#ArrowHead{
//			axiom X;
//			angle 60;
//			X: YF+XF+Y;
//			Y: XF-YF-X;
//			}
		
		setAxiom(SymbolFactory.getSymbolFactory().createSymbolofClass("X"));		
		addProduction(SimpleParser.parseProduction("X->Y/F+X/F+>Y"));
		addProduction(SimpleParser.parseProduction("Y->X/F-Y/F->X"));
	}
	
	public void setRequiredParameters(){
		setRequiredParameter(Symbol.TURN_ANGLE, 60f);
		setRequiredParameter(Symbol.PITCH_ANGLE, 0f);
		setRequiredParameter(Symbol.ROLL_ANGLE, 0f);
	}

}
